pp108 : XML Schema created from an External URL

XML Schema created from an External URL

This topic provides a description about the XML schema created from an external URL.

The XML schemas created from an external URL are saved in the workspace of the project. If the parent schema refers to the imported schemas by import or include option, the schemas will be imported into the corresponding folder of the workspace as specified in the schema location URL. The imported schemas will be created in the imported schemas folder under the project. The details about the location path of the schema is explained in the following example:
Consider that you import the schema from the external URL http://www.restfulwebservices.net/wcf/CurrencyService.svc?xsd=xsd0 and save it in the Schemas folder in the project with name CurrencyService. This schema imports XSD from http://www.restfulwebservices.net/wcf/CurrencyService.svc?xsd=xsd2 which in turn imports http://www.restfulwebservices.net/wcf/CurrencyService.svc?xsd=xsd1.

The below artifacts are created in the project.
<Project>/Schemas/CurrencyService.xsd
<Project>/importedschemas/www.restfulwebservices.net/wcf/CurrencyService_svc/xsd2.xsd
<Project>/importedschemas/www.restfulwebservices.net/wcf/CurrencyService_svc/xsd1.xsd

If you expand <Project>/Schemas/CurrencyService.xsd, you will see it's Elements, Types and also reference to its imported schemas as 'Reference_to_xsd=xsd2'.

Note: Moving the schemas to a different location will not duplicate the schema or impact the schema functionally.

For example, if you import another schema from the external URL http://www.restfulwebservices.net/wcf/CurrencyService.svc?xsd=xsd3 which imports http://www.restfulwebservices.net/wcf/CurrencyService.svc?xsd=xsd1, XSD1 is not created in the workspace. Instead XSD1 is updated with the external schema.